package com.xyy.saas.payment.adpater.abchinaLoan.core.req;

import com.xyy.saas.payment.common.exception.PayBizException;
import com.xyy.saas.payment.cores.enums.ResultCodeEnum;
import lombok.Data;
import lombok.experimental.Accessors;
import org.apache.commons.lang3.StringUtils;

/**
 * @author wangzeqi
 */
@Data
@Accessors(chain = true)
public class QueryLoanDto {

    /**
     * 企业统一信用代码
     */
    private String uscc;


    public static QueryLoanDto mock() {
        return new QueryLoanDto().setUscc("78410100MA64BBBE22");
    }

    public void checkParam() {
        if (StringUtils.isBlank(uscc)) {
            throw new PayBizException(ResultCodeEnum.PARAM_ERROR);
        }
    }

}
